<template>
  <div class="login-view">
    <div class="user-password">
      <div class="top">
          <div class="logo"></div>
          <div class="title"></div>
      </div>
      <div class="content">
        <div class='welcome'>
          <h3>欢迎登录</h3>
        </div>
        <el-form ref="form" :model="us">
          <el-form-item>
            <el-input v-model="us.username" placeholder="请输入用户名" prefix-icon="el-icon-service"></el-input>
          </el-form-item>
          <el-form-item>
            <el-input placeholder="请输入密码" v-model="us.password" show-password prefix-icon="el-icon-view" @keyup.enter.native="sub"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click.native.prevent="sub" class="subBtn">登录</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="footer">

      </div>
    </div>
    >
  </div>
</template>

<script>

  export default {

    components: {
      // name
    },
    name: "loginView",
    props: {
      // msg: String //  [name: typeof]
    },
    filters: {

    },
    computed: {

    },
    watch: {

    },
    data() {
      return {
        us: {
          username: '',
          password: ''
        }
      }
    },
    created() {

    },
    mounted() {

    },
    methods: {
      sub() {
        this.$emit('sub', this.us);
      }
    },
    destroyed() {

    }
  }
</script>

<style scoped lang="less">
  @import url('./login.less');
</style>
